import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

public class Num2465 {
    public int distinctAverages(int[] nums) {
        Arrays.sort(nums);
        int size = nums.length;
        int l = 0;
        int r = size - 1;
        Set<Double> set = new HashSet();
        while(l < r) {
            double ans = (nums[l] * 1.0 + nums[r] * 1.0) / 2;
            set.add(ans);
            l++;
            r--;
        }
        return set.size();
    }
}
